Add categories and tags placeholders in create post scripts#90
Add categories and tags placeholders in create post scripts#90
Conversation
|
@normanlorrain let me know if you notice any issues with this change to the scripts. |
…e PowerShell version.
There was a problem hiding this comment.
Pull request overview
This pull request adds categories and tags placeholders to both the shell and PowerShell blog post creation scripts, helping users create properly structured blog posts that follow the site's conventions.
Changes:
- Added
categoriesandtagsfields with placeholder values in both script templates - Added reminder messages encouraging users to use existing categories and tags
- Provided the list of six standard categories and a grep command to view existing tags
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| create_post.sh | Added categories/tags placeholders to template and reminder message with category list and tag lookup command |
| create_post.ps1 | Added categories/tags placeholders to template with inline comments and basic reminder message |
Comments suppressed due to low confidence (1)
create_post.sh:47
- The grep filter
grep -v '^authors'won't correctly exclude author names because list items under the authors field don't start with 'authors' - they start with spaces. This command will include author names in the output along with categories and tags. Consider using a more robust filtering approach, such asgrep -A 100 'tags:' docs/posts/*/index.md docs/posts/*/*/index.md docs/posts/*/*/*/index.md | grep ' - ' | sort -uto specifically extract only the tags section.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
create_post.ps1
Outdated
| - CATEGORY_HERE (use existing categories when possible) | ||
| tags: | ||
| - TAG_HERE (use existing tags when possible) |
There was a problem hiding this comment.
The inline comments "(use existing categories when possible)" and "(use existing tags when possible)" should be removed from the placeholders. According to previous feedback that was marked as fixed, these inline comments should not be present. The shell script version (create_post.sh) correctly uses plain placeholders without inline comments and relies on the reminder message below to provide guidance. Remove the inline comments to match the create_post.sh format and maintain consistency between the two scripts.
| - CATEGORY_HERE (use existing categories when possible) | |
| tags: | |
| - TAG_HERE (use existing tags when possible) | |
| - CATEGORY_HERE | |
| tags: | |
| - TAG_HERE |
There was a problem hiding this comment.
If there can be more than one category/tag, it would be helpful to document that as a YAML comment, e.g.
# use existing categories and tags when possible, in YAML list format.
Perhaps in a future commit we can have the script list the current known tags and categories.
There was a problem hiding this comment.
@normanlorrain the existing tags and categories are listed in the README. I'm not sure that is the best place for them, but they are easy to update using a clanker (coding agent).
I like your idea of a comment. I'll update the PR with that change and see what you think.
There was a problem hiding this comment.
@normanlorrain see latest commit for the changes and let me know what you think.
…ing categories/tags when possible. Based on the feedback from Norm in the PR review.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Uh oh, my editor "cleaned up" the whitespace. I only added the last two lines.
I restored the file, and re-added my changes.
There was a problem hiding this comment.
@mrbiggred not sure if it's bad form to add a file to a PR.
This script mines the existing documents to pull out the tags and categories, so they can be displayed in the "create_post" scripts.
Introduce placeholders for categories and tags in the create post scripts. Also fixed an issue date compatibility on MacOS (BSD).